<?php
$table = $this->uri->segment(3,0);
$url_ajax = base_url().'admin/ajax_field/order';
$url_ajax_sotrang = base_url().'admin/ajax_field/num';
$url_ajax_pub = base_url().'admin/ajax_field/pub/'.$table;
$url_ajax_where = base_url().'admin/ajax_field/where/'.$table;
?>
<?php include('ajax.php'); ?>
<div id="main-content">
    <div class="container">
    	<div class="row">
    		<div id="content" class="col-lg-12">
    			<!-- PAGE HEADER-->
                    <div class="row">
							<div class="col-sm-12">
								<div class="page-header">
									<div class="clearfix">
										<h3 class="content-title pull-left">Quản lí Tỉnh Thành Phố</h3>
									</div>
								</div>
							</div>
					</div>
                    <!-- DATA TABLES -->
						<div class="row">
							<div class="col-md-12">
								<!-- BOX -->
								<div class="box border green">
									<div class="box-title">
										<h4><i class="fa fa-table"></i>Danh sách môn học</h4>
										<div class="tools hidden-xs">
											<a href="javascript:;" data-toggle="tooltip" title="Ẩn đi" class="collapse">
												<i class="fa fa-chevron-up"></i>
											</a>
										</div>
									</div>
									<div class="box-body">
										<table id="datatable1" cellpadding="0" cellspacing="0" border="0" class="datatable table table-striped table-bordered table-hover">
											<thead>
												<tr>
                                                    <th>STT</th>
													<th>Tên huyện/Quận</th>
													<th class="hidden-xs">Sắp xếp</th>
													<th class="center">Tỉnh Thành</th>
													<th class="center">Sửa</th>
													<th class="center">Xóa</th>
												</tr>
											</thead>
                                            <?php 
                                            if(!empty($data)){
                                                $i=0;
                                                foreach ($data as $data) :
                                                $i++;
                                            ?>
											<tbody>
												<tr class="gradeX">
													<td><?php echo $i;  ?></td>
													<td><?php echo $data->title; ?></td>
													<td class="center"><?php echo $data->order;  ?></td>
                                                    <td class="center"><?php $prvid = $data->prvid; $tinh=$this->common_model->getone('province',array('id'=>$prvid),array('title')); echo $tinh->title;  ?></td>
													<td class="center"><a href="<?php echo base_url().'admin/xuly/district/edit/'.$data->id?>" title="Sửa môn học <?php echo $data->title;  ?>"><i class="fa fa-edit fa-2x"></i></a></td>
                                                    <td class="center"><a onclick="return confirm('Bạn có muốn xóa không?');" href="<?php echo base_url().'admin/xuly/district/xoa/'.$data->id?>" title="Xóa môn học <?php echo $data->title;  ?>"><i class="fa fa-trash-o fa-2x red"></td>
												</tr>
											</tbody>
                                            <?php endforeach; } ?>
										</table>
                                        <a href="<?php echo base_url().'admin/xuly/district/edit'; ?>" title="Thêm mới" class="btn btn-success"><i class="fa fa-angle-double-right"></i>&nbsp;&nbsp;&nbsp;Thêm mới</a>
									</div>
								</div>
								<!-- /BOX -->
							</div>
						</div>
						<!-- /DATA TABLES -->
   			</div>
    			<!-- /PAGE HEADER -->
    		</div>
    	</div>
</div>